package com.jkhan.demo.annotation;

import java.lang.annotation.Annotation;

/**
 * @ClassName AnnotationTest
 * @Description AnnotationTest
 * @Author hjk
 * @Date 2022/1/23 22:00
 **/
public class AnnotationTest {
    public static void main(String[] args) {
        Class cc = Student.class;

        Annotation[] annotations = cc.getAnnotations();
        for (int i = 0; i < annotations.length; i++) {
            System.out.println(annotations[i]);
        }
    }
}

@MyAnnotation(value = 1)
class Student {

}